package com.jzy.stock.util;

/**
 * Created by Hasee on 2022-06-22.
 */
public class ResultBuildVo<T> {
    public static ResultVo error(String errorMessage){
        ResultVo resultVo = new ResultVo();
        resultVo.setSuccess(false);
        resultVo.setErrorMessage(errorMessage);
        return resultVo;
    }
    public static<T> ResultVo success(T data){
        ResultVo resultVo = new ResultVo();
        resultVo.setSuccess(true);
        resultVo.setData(data);
        return resultVo;
    }
    public static<T> ResultVo success(){
        ResultVo resultVo = new ResultVo();
        resultVo.setSuccess(true);
        resultVo.setData(null);
        return resultVo;
    }


}
